package types;

import control.WordInfo;

public class SujetoSimple {
	private WordInfo art = null;
	private WordInfo pronom = null;
	private WordInfo sub = null;
	private WordInfo adj = null;
	
	public SujetoSimple(WordInfo _pronom) {
		pronom = _pronom;
	}
	
	public SujetoSimple(WordInfo _sub, WordInfo _adj) {
		sub = _sub;
		adj = _adj;
	}
	
	public void setArt(WordInfo art) {
		this.art = art;
	}
	public WordInfo getArt() {
		return art;
	}
	public void setPronom(WordInfo pronom) {
		this.pronom = pronom;
	}
	public WordInfo getPronom() {
		return pronom;
	}
	public void setSub(WordInfo sub) {
		this.sub = sub;
	}
	public WordInfo getSub() {
		return sub;
	}
	public void setAdj(WordInfo adj) {
		this.adj = adj;
	}
	public WordInfo getAdj() {
		return adj;
	}
	
	public String toString() {
		if (pronom != null) {
			return pronom.toString();
		}
		String ret = "";
		if (art != null) {
			ret += art.toString() + " ";
		}
		ret += sub.toString();
		if (adj != null) {
			ret += " " + adj.toString();
		}
		return ret;
	}
}
